package org.pewpew.client;

import android.os.Bundle;
import android.os.Message;

public class Messaging {

	public static final String COMMAND = "data";
	
	public static final int MSG_REGISTER_CLIENT = 1;
	public static final int MSG_UNREGISTER_CLIENT = 2;
	public static final int MSG_SET_INT_VALUE = 3;
	public static final int MSG_UPDATE_WORLD_STATE = 4;
	public static final int MSG_PROCESS_CLIENT_COMMAND = 5;
	
	public static Message packToMessage(int messageType, String commandString) {
		Bundle bundle = new Bundle();
		bundle.putString(Messaging.COMMAND, commandString);
		Message msg = Message.obtain(null, messageType);
		msg.setData(bundle);
		return msg;
	}

	static final String CMD_SHOOT = "shoot";

	static final String CMD_SET_USERNAME = "set_username";

	public static final String NEW_MESSAGE = "new_message";

	public static final String MESSAGE = "message";

}
